package com.jake.xpage.demos;

import android.content.Context;
import android.graphics.Color;
import android.view.Gravity;
import android.widget.TextView;

import androidx.annotation.NonNull;

import com.jake.xpage.page.XPage;
import com.jake.xpage.page.XPageConfig;

public class FullscreenPage extends XPage {
    TextView textView;

    public FullscreenPage(@NonNull Context context) {
        super(context);
        textView = new TextView(getContext());
        textView.setTextColor(0xff0000ff);
        textView.setGravity(Gravity.CENTER);
        textView.setText("这是text页面");
        textView.setOnClickListener(v -> {
            finish(true);
        });
        this.addView(textView, -1, -1);
        setBackgroundColor(Color.TRANSPARENT);
    }

    @Override
    protected void configPageInfo(@NonNull XPageConfig pageInfo) {
        pageInfo.statusBarShow = false;
    }
}
